//
//  EdgeInsets+Ext.swift
//  TTCOM-iOS
//
//  Created by Toj on 6/8/23.
//

import UIKit

public extension UIEdgeInsets {
    
    var st_isZero: Bool {
        return self == .zero
    }
    
    var st_vertical: CGFloat {
        return top + bottom
    }
    var st_horizontal: CGFloat {
        return left + right
    }
    
    var to_directionalEdgeInsets: NSDirectionalEdgeInsets {
        return NSDirectionalEdgeInsets(top: top, leading: left, bottom: bottom, trailing: right)
    }
}

public extension NSDirectionalEdgeInsets {
    
    var st_vertical: CGFloat {
        return top + bottom
    }
    var st_horizontal: CGFloat {
        return leading + trailing
    }
    
    var to_edgeInsets: UIEdgeInsets {
        return UIEdgeInsets(top: top, left: leading, bottom: bottom, right: trailing)
    }
}
